package com.suxin.http.response;


import com.suxin.http.model.Header;

import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author Tang
 * @classname HttpClientResponse
 * @description [  ]
 * @date 2023/3/2 21:57
 */
public interface HttpClientResponse extends Closeable {

    /**
     * getHeaders
     * @return
     */
    Header getHeaders();

    /**
     * getBody
     * @return
     * @throws IOException
     */
    InputStream getBody() throws IOException;

    /**
     * getStatusCode
     * @return
     * @throws IOException
     */
    int getStatusCode() throws IOException;

    /**
     * getStatusText
     * @return
     * @throws IOException
     */
    String getStatusText() throws IOException;

    @Override
    void close() throws IOException;
}